import * as Cesium from 'cesium';
export function loadModel({ x, y, z }, modelUrl) {
  const position = Cesium.Cartesian3.fromDegrees(x, y, z);
  const heading = Cesium.Math.toRadians(180);
  const pitch = 0;
  const roll = 0;
  const hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
  const orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
  return {
    name: modelUrl,
    position: position,
    orientation: orientation,
    model: {
      uri: modelUrl,
      minimumPixelSize: 128,
      maximumScale: 20000
    }
  };
}
